package com.qfedu.provider.controller;

import com.qfedu.provider.service.DbDynamicsService;
import com.qfedu.provider.service.DbProductTypeService;
import com.qfedu.provider.service.DbVideoService;
import com.qfedu.utils.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @date 2024/11/23 上午11:46
 */
@RestController
@RequestMapping("/server/producttype")
@Tag(name = "作品类型管理")
@RequiredArgsConstructor
public class ProductionTypeController {

    private final DbDynamicsService dbDynamicsService;
    private final DbVideoService dbVideoService;

    @Operation(summary = "根据类型查询视频作品")
    @GetMapping("findAllVideoByType")
    public R findAllVideo(Integer typeId) {
        return dbVideoService.queryAllVideoByType(typeId);
    }

    @Operation(summary = "根据类型查询图文作品")
    @GetMapping("findAllDynamicByType")
    public R findAllDynamic(Integer typeId) {
        return dbDynamicsService.queryAllDynamicByType(typeId);
    }
}
